package com.shushan.exam.adapter;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import java.util.List;

/**
 * @ClassName: ExamFragmentAdapter
 * @Desciption: 考试界面fragment的adapter
 * @author: yichaohua
 * @date: 2018-01-05
 */
public class ExamFragmentAdapter extends FragmentStatePagerAdapter {

    private static final String TAG = "ExamFragmentAdapter";

    private List<Fragment> fragments = null;
    private Context context;

    public ExamFragmentAdapter(Context context, FragmentManager fm, List<Fragment> fragments) {
        super(fm);
        this.fragments = fragments;
        this.context = context;
    }

    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }
}
